const http = uni.$u.http

// 发送验证码 
export const smsCode = (params, config = {}) => http.post('/miniApp/auth/sms-code-app', params, config)

// 登录 
export const smsLogin = (params, config = {}) => http.post('/miniApp/auth/sms-login-app', params, config)

//登录选择企业绑定企业id
export const userEtpBind = (params, config = {}) => http.post('/mch/enterprise/user-etp-bind', params, config)

// 获取个人信息 
export const getUserInfo = (data) => http.get('/user/getUserInfo', data)

// 货主端司机列表 
export const driverList = (data) => http.get('/driverService/pageApp', data)

// 司机详情 
export const driverDetail = (data) => http.get('/driverService/getDetails', data)

// 邀请司机 生成二维码
export const driverInvite = (params, config = {}) => http.post('/driverService/driverInvite', params, config)

// 免审二维码接口 
export const driverInviteTrialExemption = (params, config = {}) => http.post('/driverService/driverInviteTrialExemption', params, config)

// 添加司机提交接口 
export const driverRegister = (params, config = {}) => http.post('/driverService/driverAdd', params, config)

// 编辑司机提交接口 
export const driverUpdate = (params, config = {}) => http.post('/driverService/driverUpdate', params, config)

//统一新增司机接口
export const driverAdd = (params, config = {}) => http.post('/DriverVehicleUnified/driverAdd', params, config)

// 获取ip 
export const getIp = (data) => http.get('/driverService/getIp', data)

// 校验司机是否存在该企业 
export const checkIdCardUnique = (params, config = {}) => http.post('/driverService/checkIdCardUnique', params, config)

//运单列表export const waybillList = (params, config = {}) => http.post('/waybill/pageApp', params, config)

//运单选择承运商列表
export const querySelector = (params, config = {}) => http.post('/waybill/querySelector', params, config)

//获取省市区
export const selectRegion = (data) => http.get('/basis/qvoRegion/selectRegion', data)

// ----运单状态接口
export const queryDicKeyValueList = (params, config = {}) => http.post('/dic/queryDicKeyValueList', params, config)

//查询数据字典接口
export const queryDic = (params, config = {}) => http.post('/driverService/queryDic', params, config)

// 获取车辆类型 
export const getVehicleType = (data) => http.get('/vehicleInfoApp/getVehicleType', data)

// 添加车辆提交接口 
export const driverRelVehicle = (params, config = {}) => http.post('/vehicleInfoApp/addVehicle', params, config)

// 编辑车辆提交接口 
export const editVehicle = (params, config = {}) => http.post('/vehicleInfoApp/editVehicle', params, config)

// 获取用户关联项目
export const getProject = (data) => http.get('/driverService/project', data)

// 修改关联企业
export const updateProject = (params, config = {}) => http.post('/driverService/updateProjectDriver', params, config)

// 货主端司机审批驳回
export const driverReject = (data) => http.get('/driverService/close', data)

// 货主端司机审核通过
export const driverPass = (params, config = {}) => http.post('/driverService/check', params, config)

// 货主端添加司机时获取项目
export const getAllReject = (data) => http.get('/driverService/getProject', data)

// 货主端车辆列表
export const vehicleList = (data) => http.get('/vehicleInfoApp/pageApp', data)

// 货主端车辆详情
export const vehicleInfo = (data) => http.get('/vehicleInfoApp/queryById', data)

// 货主端添加黑名单
export const blacklistAdd = (params, config = {}) => http.post('/blacklist/blacklistAdd', params, config)

// 货主端删除黑名单
export const blacklistDelete = (params, config = {}) => http.post('/blacklist/blacklistDelete', params, config)

// 车辆取消关联司机
export const updateVehicle = (params, config = {}) => http.post('/vehicleInfoApp/driverAanVehicle', params,config)

//车辆取消关联司机单条
export const driverAanVehicle = (data) => http.get(`/vehicleInfoApp/deleteOneDriverAanVehicle?driverVehicleId=${data.driverVehicleId}`, data)

// 获取关联司机列表
export const getDriverPage = (data) => http.get('/vehicleInfoApp/getDriverPage', data)

// 获取关联司机列表
export const vehicleApproval = (data) => http.get('/vehicleInfoApp/vehicleApproval', data)

// 运单新增查询字段数据
export const queryDicKey = (params, config = {}) => http.post('/dic/queryDicKeyValueList', params, config)

// 获取项目相关的合同列表
export const queryCntByProject = (data) => http.get('/cnt/queryCntByProject', data)

// 获取项目相关的合同信息
export const queryCntPluByCntId = (data) => http.get('/cnt/queryCntPluByCntId', data)

// 货主端指派承运商列表
export const carrierList = (data) => http.get('/driverService/allList', data)

// 货主端货物名称查询
export const cargoDamage = (params, config = {}) => http.post('/basis/cargoDamage/page1', params, config)

// 查询项目相关线路
export const queryLine = (data) => http.get('/basis/line-info/queryLineByProjectId', data)

// 路线管理添加接口
export const addLine = (params, config = {}) => http.post('/basis/line-info/add', params, config)

// 获取历史线路地址
export const getShipperReceiver = (data) => http.get('/waybill/getShipperReceiver', data)

// 获取省市区
export const getRegion = (data) => http.get('/basis/qvoRegion/selectRegion', data)

// 删除路线
export const deleteLine = (data) => http.get('/basis/line-info/delete', data)

// 存草稿
export const saveDraft = (params, config = {}) => http.post('/waybill/saveDraft', params, config)

// 获取草稿信息
export const getDraft = (data) => http.get('/waybill/queryById', data)

// 删除草稿
export const deleteDraft = (data) => http.get('/waybill/deleteWaybill', data)

// 编辑草稿
export const editDraft = (params, config = {}) => http.post('/waybill/editDraft', params, config)

// 发布草稿
export const publishWaybill = (data) => http.get('/waybill/publishWaybill', data)

// 发布运单
export const savePublish = (params, config = {}) => http.post('/waybill/savePublish', params, config)

// 编辑运单
export const editPublish = (params, config = {}) => http.post('/waybill/editPublish', params, config)

//货损方案列表
export const cargoDamagePage = (params, config = {}) => http.post('/CargoDamage/cargoDamagePage', params, config)

// 查询当前签约网络承运商
export const queryCurrSignPlatformCo = (data) => http.get('/waybill/queryCurrSignPlatformCo', data)

//运单数据看板
export const wayBillDataBulletinBoard = (data) => http.get('/new/loadingOrder/wayBillDataBulletinBoard?wayBillId='+ data.wayBillId, data)

//运单信息详情
export const wayBillInfo = (data) => http.get('/new/loadingOrder/wayBillInfo?wayBillId='+ data.wayBillId, data)


//承运商列表
export const carriers = (data) => http.get('/new/loadingOrder/carriers?etpName='+ data.etpName, data)

//配载单列表
export const getLoadingOrders = (params, config = {}) => http.post('/new/loadingOrder/queryPage', params, config)


//配载单筛选 配载单状态配载单物流状态
export const queryDicByDicType = (data) => http.get('/new/loadingOrder/queryDicByDicType/LOADING_ORDER_BILL_STATUS,LOADING_ORDER_SHIPPING_STATUS', data)

//配置单司机列表
export const querySelectorDriver = (params, config = {}) => http.post('/new/loadingOrder/querySelectorDriver', params, config)

//车辆列表
export const querySelectorVehicle = (params, config = {}) => http.post('/new/loadingOrder/querySelectorVehicle', params, config)

//配载单详情
export const loadingOrderInfo = (data) => http.get('/new/loadingOrder/loadingOrderInfo?loadingOrderId='+ data.loadingOrderId, data)

//检测版本更新
export const checkVersion = (params, config = {}) => http.post(`/version/check?userVersion=${params.userVersion}&userPlatform=${params.userPlatform}`, params, config)

//查询用户菜单权限
export const getUserMenuList = (data) => http.get('/menu/getUserMenuListApp', data)

//配载单可配载详情
export const wayBillStowageInfo = (params, config = {}) => http.post('/new/loadingOrder/wayBillStowageInfo', params, config)

//修改运单指派模式
export const updateWayBillMold = (params, config = {}) => http.post('/new/loadingOrder/updateWayBillMold', params, config)

//二维码详情
export const wayBillQrCode = (data) => http.get('/new/loadingOrder/wayBillQrCode?wayBillId='+ data.wayBillId, data)

//erweima
export const configureQrCode = (params, config = {}) => http.post('/new/loadingOrder/configureQrCode', params, config)

//修改承运商
export const updateCarrier = (params, config = {}) => http.post('/new/loadingOrder/updateCarrier', params, config)

//修改运力
export const editLoading = (params, config = {}) => http.post('/new/loadingOrder/edit', params, config)

//增加指派配载单
export const shipWaybill = (params, config = {}) => http.post('/new/loadingOrder/shipWaybill', params, config)

//费用取整字典
export const freightSel = (data) => http.get('/dic/queryDicByDicType/FREIGHT_ROUNDING', data)

//获取运单货源广场数据
export const getGoodsSquare = (data) => http.get('/waybill/getGoodsSquare?Waybill='+ data.Waybill, data)

//修改货源广场的价格
export const updateShippingPrice = (params, config = {}) => http.post('/waybill/updateShippingPrice', params, config)